<legend class='hyc-legend'>
    <span>用户编辑</span>
</legend>
<div class="panel panel-default">
    <div class="panel-heading">{{userObj.info.username || '添加用户'}}</div>
    <div class="panel-body admin">
        <div class="row">
            <div class="col-md-offset-2 col-md-6">
                <div class="row margin-bottom-10">
                    <div class="col-md-4 text-right">名称：</div>
                    <div class="col-md-8">
                        <span ng-if="userObj.info.id">{{userObj.info.username}}</span>
                        <input ng-if="!userObj.info.id" class="input" ng-model="userObj.info.username" placeholder="请输入登录名">
                    </div>
                </div>
                <div class="row margin-bottom-10">
                    <div class="col-md-4 text-right">密码：</div>
                    <div class="col-md-8">
                        <input class="input" ng-model="userObj.newPassword" placeholder="请输入即修改用户密码">
                    </div>
                </div>
                <div class="row margin-bottom-10">
                    <div class="col-md-4 text-right">可用：</div>
                    <div class="col-md-8">
                        <button type="button" class="btn btn-default admin-select select" ng-model="userObj.info.enabled" bs-options="item.code as item.name for item in userObj.enabledList" bs-select placeholder="---请选择---" max-length-html="个被选中" allText="选中全部" noneText="没有选中">
                        </button>
                    </div>
                </div>
                <div class="row margin-bottom-10">
                    <div class="col-md-4 text-right">角色：</div>
                    <div class="col-md-8">
                        <button type="button" class="btn btn-default admin-select select" ng-model="userObj.info.roleId" bs-options="item.id as item.name for item in userObj.roleList" bs-select placeholder="---请选择---" max-length-html="个被选中" allText="选中全部" noneText="没有选中">
                        </button>
                    </div>
                </div>
                <div class="row margin-bottom-10"></div>
                <div class="row margin-bottom-10">
                    <div class="col-md-offset-4 col-md-8 text-center">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="btn btn btn-default btn-block" onclick="javascript: history.go(-1);">返回</div>
                            </div>
                            <div class="col-md-6">
                                <div class="btn btn btn-warning btn-block" ng-click="userObj.save()">保存</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>